package com.ledi.guns.common.persistence.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import lombok.Data;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.annotations.Version;
import com.baomidou.mybatisplus.enums.IdType;

/**
 * <p>
 * </p>
 *
 * @author ledi
 * @since 2017-11-30
 */
@TableName("t_bill")
@Data
public class Bill extends Model<Bill> {

	private static final long serialVersionUID = 1L;

	@TableId(value = "id", type = IdType.AUTO)
	private Long id;
	/**
	 * 账单名称
	 */
	private String name;
	/**
	 * 账单截止时间
	 */
	@TableField("bill_end_time")
	private Date billEndTime;
	/**
	 * 应缴费学生总数
	 */
	@TableField("student_num")
	private Integer studentNum;
	/**
	 * 实际支付学生数量
	 */
	@TableField("student_num_pay")
	private Integer studentNumPay;
	/**
	 * 应收款总额
	 */
	private BigDecimal total;
	/**
	 * 实际收款总额
	 */
	@TableField("total_pay")
	private BigDecimal totalPay;
	/**
	 * 是否成功（0：全部成功，1：部分成功，2：全部失败）
	 */
	@TableField("is_success")
	private Integer isSuccess;
	@TableField("create_time")
	private Date createTime;
	@TableField("creator_role")
	private String creatorRole;
	@TableField("creator_id")
	private Long creatorId;
	@TableField("update_time")
	private Date updateTime;
	@TableField("updater_role")
	private String updaterRole;
	@TableField("updater_id")
	private Long updaterId;
	/**
	 * 是否删除：0-未删除；1-已删除
	 */
	@TableField("is_delete")
	private Integer isDelete;
	@Version
	private Integer versionNo;
	/**
	 * 备注
	 */
	private String comment;
	@TableField("school_id")
	private Long schoolId;

	/**
	 * 0-老数据；1-新数据创建账单；2创建当面付账单
	 */
	@TableField("bill_type")
	private Integer billType;

	/**
	 * 账单编号
	 */
	@TableField("bill_number")
	private String billNumber;

	@Override
	protected Serializable pkVal() {

		return id;
	}

}
